var mongoose=require('mongoose')
var db=require('./mongoose_db.js')


var studentSchema=new mongoose.Schema({                   //（模式）数据类型  不是模型
    name:String,
    author:String
})

var Cat=db.model('Student',studentSchema)

Cat.find({name:"蒙哥"},function(err,result){              
    var xiaomao=result[0]       //小猫是一个cat的实例
    xiaomao.author='666'
    xiaomao.save();
    console.log(xiaomao)

})